﻿@model AuditModel.Archive

<fieldset>
    <legend>@AuditResources.Archive.ObjectName</legend>

    <div class="display-label">@AuditResources.Archive.AnnualEventID</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.AnnualEvent.Title)
    </div>

    <div class="display-label">@AuditResources.Archive.CountyCode</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.County.Name)
    </div>

    <div class="display-label">@AuditResources.Archive.SubjectID</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Subject.Name)
    </div>

    <div class="display-label">@AuditResources.Archive.TeacherName</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.TeacherName)
    </div>

            <div class="display-label">
           @AuditResources.Archive.PhotoUrl
        </div>
        <div class="display-field">
            @if (Model != null&&!string.IsNullOrEmpty(Model.PhotoUrl))
        {
             @AuditWeb.Helpers.Image(this.Html, Model.PhotoUrl, Model.TeacherName, 150)
        }
        else
        {
            @AuditWeb.Helpers.Image(this.Html, "~/Content/photos/profile.jpg", "Profile", 150)
        }
        </div>

    <div class="display-label">
           @AuditResources.Archive.ClassTitle
        </div>
        <div class="display-field">
            @Html.DisplayFor(model=>model.ClassTitle)
        </div>



        <div class="display-label">
           @AuditResources.Archive.Birthdate
        </div>
        <div class="display-field">
            @(Model == null||Model.Birthdate==null ? "" : Model.Birthdate.Value.ToShortDateString())
        </div>

        <div class="display-label">
           @AuditResources.Archive.Gender
        </div>
        <div class="display-field">
            @Html.DisplayFor(model=>model.Gender)
        </div>

        <div class="display-label">
           @AuditResources.Archive.PhoneNumber
        </div>
        <div class="display-field">
            @Html.DisplayFor(model=>model.PhoneNumber)
        </div>

        <div class="display-label">
           @AuditResources.Archive.EducationDegree
        </div>
        <div class="display-field">
            @Html.DisplayFor(model=>model.EducationDegree)
        </div>

        <div class="display-label">
           @AuditResources.Archive.GradeLevel
        </div>
        <div class="display-field">
            @Html.DisplayFor(model=>model.GradeLevel)
        </div>

        <div class="display-label">
           @AuditResources.Archive.TeachingYears
        </div>
        <div class="display-field">
            @Html.DisplayFor(model=>model.TeachingYears)
        </div>

        <div class="display-label">
           @AuditResources.Archive.SchoolName
        </div>
        <div class="display-field">
            @Html.DisplayFor(model=>model.SchoolName)
        </div>

        <div class="display-label">
           @AuditResources.Archive.SchoolPrincipal
        </div>
        <div class="display-field">
            @Html.DisplayFor(model=>model.SchoolPrincipal)
        </div>

        <div class="display-label">
           @AuditResources.Archive.SchoolAddress
        </div>
        <div class="display-field">
            @Html.DisplayFor(model=>model.SchoolAddress)
        </div>


    <div class="display-label">@AuditResources.Archive.SchoolComment</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.SchoolComment)
    </div>

    <div class="display-label">@AuditResources.Archive.CountyComment</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.CountyComment)
    </div>

    <div class="display-label">@AuditResources.Archive.CountyEBComment</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.CountyEBComment)
    </div>

    <div class="display-label">@AuditResources.Archive.Attachment1LessonPlan</div>
    <div class="display-field">
        @if (Model != null && !string.IsNullOrEmpty(Model.Attachment1LessonPlan))
            {
             @Html.ActionLink(Model.Attachment1LessonPlan, "GetLessonPlan", "DownloadManager", new { id = Model.ID }, new { style = "display:inline-block;width:100px" })
            }
            else
            {
            <text>无</text>
            }
    </div>

    <div class="display-label">@AuditResources.Archive.Attachment2Explanation</div>
    <div class="display-field">
        @if (Model != null && !string.IsNullOrEmpty(Model.Attachment2Explanation))
            {
             @Html.ActionLink(Model.Attachment2Explanation, "GetExplanation", "DownloadManager", new { id = Model.ID }, new { style = "display:inline-block;width:100px" })
            }
            else
            {
            <text>无</text>
            }
    </div>

    <div class="display-label">@AuditResources.Archive.ClassDate</div>
    <div class="display-field">
        @{string date = Model.ClassDate != null ? Model.ClassDate.Value.ToShortDateString() : "";}
            @date
    </div>

    <div class="display-label">@AuditResources.Archive.ClassTime</div>
    <div class="display-field">
        @{string time = Model.ClassTime != null ? Model.ClassTime.Value.ToShortTimeString() : "";}
@time
    </div>

    <div class="editor-label">
            @AuditResources.Archive.Attachments
        </div>
        <div class="editor-field">
        <ul class="attachment">
            @foreach (var file in Model.Attachments)
            {
                <li>@AuditWeb.Helpers.Link(this.Html, file.FilePath,file.Title,"_self")</li>
            }
         </ul>
        </div>
</fieldset>